use "d:\data\Figure2SPSSfixedeffectsresults_education.dta", clear
*note: figure 2 requires most recent version of eclplot. Search keyword eclplot.
gen educ_lo = educ_b - (1.96*educ_se)
gen educ_hi = educ_b + (1.96*educ_se)
eclplot educ_b educ_lo educ_hi ginicalc, saving(ginibybeducnolegend.gph) eplottype(scatter) rplottype(rspike) supby( regdesc ,) estopts(  msize(small) mcolor(black) mfcolor(black) mlpattern(solid) mlwidth(vthin) mlcolor(black) sort ) ciopts( blpattern(solid) blwidth(vthin)  blcolor(gs11) msize(tiny) ) yline(0, lpattern(solid) lwidth(vthin) lcolor(black) style(default) ) ytitle(B(Education), size(small)  color(black) margin(small)) yscale(lcolor(black)) ylabel(, tlcolor(black) labcolor(black) labsize(vsmall)) xtitle(Income inequality (GINI),  size(small) color(black) margin(small)) xlabel(, tlcolor(black) labcolor(black) labsize(vsmall)) legend(off) ysize(10) xsize(10)  legend(region(fcolor(none))) graphregion(fcolor(white) lcolor(none) ifcolor(white) ilcolor(none)) plotregion(fcolor(white) lcolor(none)  lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plot(lfit  educ_b  ginicalc, lpattern(solid) lwidth(thin)) aspectratio(1.0)
graph export ginibyeducnolegend.emf
eclplot educ_b educ_lo educ_hi  gdpcappp, saving(gdpibybeducnolegend.gph) eplottype(scatter) rplottype(rspike) supby( regdesc ,) estopts(  msize(small) mcolor(black) mfcolor(black) mlpattern(solid) mlwidth(vthin) mlcolor(black) sort ) ciopts( blpattern(solid) blwidth(vthin)  blcolor(gs11) msize(tiny) ) yline(0, lpattern(solid) lwidth(vthin) lcolor(black) style(default) ) ytitle(B(Education), size(small)  color(black) margin(small)) yscale(lcolor(black)) ylabel(, tlcolor(black) labcolor(black) labsize(vsmall)) xtitle(Economic development  (GDP/capita PPP, International 2000 $), size(small) color(black) margin(small)) xlabel(, tlcolor(black) labcolor(black) labsize(vsmall))  legend(off) ysize(10) xsize(10) legend(region(fcolor(none))) graphregion(fcolor(white) lcolor(none) ifcolor(white) ilcolor(none))  plotregion(fcolor(white) lcolor(none) lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plot(lfit  educ_b  gdpcappp, lpattern(solid)  lwidth(thin)) aspectratio(1.0)
graph export gdpbyeducnolegend.emf
clear
use "d:\data\Figure2SPSSfixedeffectsresults_income.dta", clear
gen income_lo = income_b - (1.96*income_se)
gen income_lo = income_b - (1.96*income_s)
gen income_hi = income_b + (1.96*income_s)
eclplot income_b income_lo income_hi ginicalc, saving(ginibybincomenolegend.gph) eplottype(scatter) rplottype(rspike) supby( regdesc ,) estopts(  msize(small) mcolor(black) mfcolor(black) mlpattern(solid) mlwidth(vthin) mlcolor(black) sort ) ciopts( blpattern(solid) blwidth(vthin)  blcolor(gs11) msize(tiny) ) yline(0, lpattern(solid) lwidth(vthin) lcolor(black) style(default) ) ytitle(B(Income), size(small)  color(black) margin(small)) yscale(lcolor(black)) ylabel(, tlcolor(black) labcolor(black) labsize(vsmall)) xtitle(Income inequality (GINI),  size(small) color(black) margin(small)) xlabel(, tlcolor(black) labcolor(black) labsize(vsmall)) legend(off) ysize(10) xsize(10)  legend(region(fcolor(none))) graphregion(fcolor(white) lcolor(none) ifcolor(white) ilcolor(none)) plotregion(fcolor(white) lcolor(none)  lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plot(lfit  income_b  ginicalc, lpattern(solid) lwidth(thin)) aspectratio(1.0)
graph export ginibyincomenolegend.emf
eclplot income_b income_lo income_hi  gdpcappp, saving(gdpbybincomenolegend.gph) eplottype(scatter) rplottype(rspike) supby( regdesc ,) estopts(  msize(small) mcolor(black) mfcolor(black) mlpattern(solid) mlwidth(vthin) mlcolor(black) sort ) ciopts( blpattern(solid) blwidth(vthin)  blcolor(gs11) msize(tiny) ) yline(0, lpattern(solid) lwidth(vthin) lcolor(black) style(default) ) ytitle(B(Income), size(small)  color(black) margin(small)) yscale(lcolor(black)) ylabel(, tlcolor(black) labcolor(black) labsize(vsmall)) xtitle(Economic development  (GDP/capita PPP, International 2000 $), size(small) color(black) margin(small)) xlabel(, tlcolor(black) labcolor(black) labsize(vsmall))  legend(off) ysize(10) xsize(10) legend(region(fcolor(none))) graphregion(fcolor(white) lcolor(none) ifcolor(white) ilcolor(none))  plotregion(fcolor(white) lcolor(none) lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plot(lfit  income_b  gdpcappp, lpattern(solid)  lwidth(thin)) aspectratio(1.0)
graph export gdpbybincomenolegend.emf

